<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />

<style type="text/css">
p {
	color: #003300;
}

h2 {
	color: blue;
	font-size: 120%
}

h3 {
	color: darkmagenta;
	font-size: 110%
}

pre {
	background-color: #cccccc;
}
</style>



<!--========== METADATA ===========-->
<title></title>
<meta name="Description" content="" />
<meta name="Keywords" content="" />
<link rel="canonical" href="" />
<!--========== /METADATA ===========-->



<!--========== IMPORT ===========-->
<!--========== /IMPORT ===========-->

</head>


<body>
	<p>Kzend utility Readme.html</p>

	<h1>Bootstrap(Start process)</h1>

	<p>We describe the boot process in Bootstrap.php placed directly under application.</p>

	<pre>
// Required base class
require_once("Kzend/Bootstrap/Abstract.php");

class Bootstrap extends Kzend_Bootstrap_Abstract
{
	// Init view
	protected function _initView()
	{
		parent::_initView();
	}

	// Init database
	protected function _initDatabase()
	{
		parent::_initDatabase();
	}
}
</pre>


	<h1>Setting File</h1>
	<h2>Basic Setting</h2>

	<h3>Placement of the Setting file</h3>

	<p>application/configs/application.ini</p>

	<h2>FQDN Environment Setting</h2>

	<p>use SetEnvIf to set APPLICATION_ENV in .htaccess file</p>

	<pre>
SetEnvIf Host (.*) APPLICATION_ENV=development-$1
SetEnvIf Host localhost APPLICATION_ENV=development-windows
</pre>

	<p>
		Above setting for APPLICATION_ENV=development-windows on localhost <br /> <br />It's described as follows in application.ini settings for each environment.
	</p>

	<pre>
[development-windows : production]
section = "development-windows"
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1
</pre>


	<h2>Include path</h2>
	<h2>Database connection</h2>
	<h2>View variable definition</h2>
	<h2>Logging settings</h2>
	<h2>Session Settings</h2>
	<h2>Authentication settings</h2>
	<h2>Message Settings</h2>


	<h1>Class structure</h1>

	<h1>Kzend utility</h1>
	<h2>View output</h2>

	<p>Variable in Controller/View</p>

	<pre>
At controller class
$this-&gt;view-&gt;varView1 = $varCtrl1;
$this-&gt;view-&gt;varView2 = $varCtrl2;

At view class
&lt;?= $varView1 ?&gt;  ※HTML is escaped.
&lt;?php echo $varView2 ?&gt; ※Not escaped.

</pre>


	<h2>Database access</h2>
	<h2>Action helpers / View helpers</h2>
	<h2>Authentication</h2>
	<h2>Message management</h2>
	<h2>Form operations</h2>

	<h3>Transaction token</h3>

	<p>
		Deterrence double post, cross-site request forgery measures, you can use the check processing request token from the previous screen transitions that are allowed can be confirmed.<br /> <br />  [How to use]<br />
		Add the following code to the template of the screen to request a token check processing. Please write in the form tag to output a hidden control that has a token value.
	</p>

	<pre>
&lt;?php echo $this-&gt;transactionToken("account"); ?&gt;
※The parameter name of the form, the form that is used in the case of one page is optional.
&lt;?php echo $this-&gt;transactionToken(); ?&gt;
</pre>

	<p>Controller classes are conducted in the token check. If the form is one, the name of the form of the parameter is optional.</p>

	<pre>
		// Check the transaction token.
		if(!$this-&gt;_helper-&gt;transactionToken-&gt;check("account")) {
			$this-&gt;view-&gt;errors = array($this-&gt;getMessage("VMSG_DUPERR"));
			$this-&gt;_helper-&gt;ViewRenderer-&gt;setScriptAction("edit-input");
			return;
		}
</pre>


</body>
</html>
